import classNames from 'classnames'
const Tabs = ({ tabs, active, tabChange }) => {
  console.log(tabs)
  return (
    <div className="tabs-order">
      <ul className="sort-container">
        {tabs.map((item) => {
          return (
            <li
              onClick={() => tabChange(item.type)}
              key={item.id}
              className={classNames({ on: item.type === active })}
            >
              按{item.name}排序
            </li>
          )
        })}
      </ul>
    </div>
  )
}

export default Tabs
